var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var r in t) t.hasOwnProperty(r) && (e[r] = t[r]);
    })(e, t);
}, function(e, t) {
    function r() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, 
    new r());
}), a = this && this.__decorate || function(e, t, r, a) {
    var i, o = arguments.length, n = o < 3 ? t : null === a ? a = Object.getOwnPropertyDescriptor(t, r) : a;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(e, t, r, a); else for (var p = e.length - 1; 0 <= p; p--) (i = e[p]) && (n = (o < 3 ? i(n) : 3 < o ? i(t, r, n) : i(t, r)) || n);
    return 3 < o && n && Object.defineProperty(t, r, n), n;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("LoadManager"), s = e("Global"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.cardSprite = null, e.rareSprite = null, e.itemSprite = null, e.nameLabel = null, 
        e;
    }
    return i(e, t), e.prototype.start = function() {}, e.prototype.init = function(e) {
        var t;
        r.default.getInstance().loadSpriteFrame({
            url: "texture/rare/sign/" + e.data.rare,
            sprite: this.rareSprite
        }), r.default.getInstance().loadSpriteFrame({
            url: "texture/rare/card/" + e.data.rare,
            sprite: this.cardSprite
        }), e.type == s.RewardType.ARM ? (this.itemSprite.node.scaleX = -1, this.itemSprite.node.scaleY = 1, 
        r.default.getInstance().loadSpriteFrame({
            url: "texture/armOlympic/" + e.data.idx,
            sprite: this.itemSprite
        }), (t = s.G.getGunModel(e.data.idx)) && t.m && (this.nameLabel.string = t.m)) : e.type == s.RewardType.SKIN && (this.itemSprite.node.scale = 1.5, 
        r.default.getInstance().loadSpriteFrame({
            url: "image/skin/" + e.data.idx,
            sprite: this.itemSprite
        }), (t = s.G.getPersonModel(e.data.idx)) && t.m && (this.nameLabel.string = t.m));
    }, a([ d(cc.Sprite) ], e.prototype, "cardSprite", void 0), a([ d(cc.Sprite) ], e.prototype, "rareSprite", void 0), 
    a([ d(cc.Sprite) ], e.prototype, "itemSprite", void 0), a([ d(cc.Label) ], e.prototype, "nameLabel", void 0), 
    a([ l ], e);
}(cc.Component);

n.default = u;